import Vue from 'vue'
import App from './App.vue'
import router from './router/index'

Vue.config.productionTip = false

//引入axios
import axios from 'axios'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import dayjs from 'dayjs'

//指定axios引用的根路径
axios.defaults.baseURL = "http://localhost:8080";

Vue.prototype.$axios=axios;
Vue.use(ElementUI);


//注册全局过滤器
Vue.filter('dateFormat', function (time) {
  const dtStr = dayjs.unix(time).format('YYYY-MM-DD HH:mm:ss')
  return dtStr
})

new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
